@import '../style/theme/color';
@import '../style/theme/corner';
@import '../style/core/_font';

.devui-loading-wrapper {
  display: flex;
  flex: 1 1 auto;
}

.devui-loading-wrapper.devui-loading-full {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1001;
}

.devui-spinner-wrapper {
  position: absolute;
  z-index: 1001;
  width: max-content;
  max-width: 100%;
}

.devui-message-wrapper {
  background: $devui-base-bg;
  border-radius: $devui-border-radius-card;
}

.devui-fix-loading-position {
  transform: translate(-50%, -50%);
}

.devui-busy-default-sign {
  position: relative;
  display: inline-block;
  z-index: 1001;
  padding: 12px 14px;
  color: $devui-text;
}

.devui-busy-default-text {
  display: inline-block;
  margin-left: 6px;
  max-width: 400px;
  font-size: $devui-font-size;
  text-align: left;
}

.devui-busy-default-spinner {
  position: relative;
  display: inline-block;
  width: 15px;
  height: 15px;
  animation: devui-busy-spinner-anim 1s linear infinite;

  div {
    position: absolute;
    left: 44.5%;
    top: 37%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
  }

  .devui-loading-bar1 {
    top: 0;
    left: 0;
    background: $devui-brand;
  }

  .devui-loading-bar2 {
    top: 0;
    left: 9px;
    background: $devui-brand-foil;
  }

  .devui-loading-bar3 {
    top: 9px;
    left: 0;
    background: $devui-brand-foil;
  }

  .devui-loading-bar4 {
    top: 9px;
    left: 9px;
    background: $devui-brand;
  }
}

@keyframes devui-busy-spinner-anim {
  0% {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(135deg) scale(1.5);
  }

  100% {
    transform: rotate(270deg) scale(1);
  }
}
